package cn.starlightsoftware.sherly.controller.admin.permission.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import cn.starlightsoftware.sherly.enums.BooleanEnum;
import cn.starlightsoftware.sherly.enums.UsableEnum;
import cn.starlightsoftware.sherly.model.PageQuery;

/**
 * @author 谷子毅
 * @date 2024/4/28
 */
@Data
public class PermissionPageReqVO extends PageQuery {

    @Schema(description = "父权限", example = "1")
    private String parentId;

    @Schema(description = "权限名称", example = "首页")
    private String permissionName;

    @Schema(description = "权限代码", example = "index")
    private String permissionCode;

    @Schema(description = "权限类型", example = "1")
    private Integer permissionType;

    /** 组件地址 */
    @Schema(description = "组件地址", example = "/index")
    private String componentPath;

    /** 组件名称 */
    @Schema(description = "组件名称", example = "Index")
    private String componentName;

    /** 路由地址 */
    @Schema(description = "路由地址", example = "/index")
    private String path;

    /** 排序 */
    @Schema(description = "排序", example = "1")
    private Integer sort;

    /**
     * 类目状态
     * 等价理解为可用性
     */
    @Schema(description = "可用性", example = "1")
    private UsableEnum usable;

    /**
     * 显示状态
     * 只有目录和菜单使用
     * 当设置为 true，该菜单不会展示在侧边栏，但是路由还是存在。例如说，一些独立的编辑页面 /edit/1024 等等
     */
    @Schema(description = "是否可见", example = "1")
    private BooleanEnum visible;

    /**
     * 总是显示
     * 如果为 false，当该菜单只有一个子菜单时，不展示自己，直接展示子菜单
     */
    @Schema(description = "是否总是显示", example = "1")
    private BooleanEnum alwaysShow;

    /**
     * 缓存状态
     * 只有目录和菜单使用，否使用 Vue 路由的 keep-alive 特性
     * 注意：如果开启缓存，则必须填写 componentName，否则无法缓存
     */
    @Schema(description = "是否缓存", example = "1")
    private BooleanEnum keepAlive;

    
}
